package com.ctshk.rpc.finance.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ctshk.rpc.finance.dto.bill.BillRejectDTO;
import com.ctshk.rpc.finance.entity.FinanceBillReject;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 认款驳回记录 Mapper 接口
 * </p>
 *
 * @author 叶冠峰
 * @since 2021-04-19
 */
public interface FinanceBillRejectMapper extends BaseMapper<FinanceBillReject> {

    /**
     * 认款管理-驳回信息
     * @param iPage
     * @param billId
     * @return
     */
    @Select("SELECT id,reject_info,create_user_name,create_user_dept,gmt_create \n" +
            "FROM t_finance_bill_reject\n" +
            "WHERE bill_id = #{bill_id}\n" +
            "ORDER BY gmt_create DESC")
    Page<BillRejectDTO> queryPageByBill(@Param("iPage") Page<BillRejectDTO> iPage, @Param("bill_id") Long billId);
}
